var http = require('http');
var url = require('url');

http.createServer(function (request,response) {
    var urlObj = url.parse(request.url,true);
    console.log(urlObj);
     response.writeHead(200,{'Content-Type':'text/html;charset=utf8'})
    if(urlObj.query.username=="admin"&&urlObj.query.password=="123456"){
        response.write("登录成功");
    }else{
        response.write("登录失败");
    }
    response.end();

}).listen(3000);




console.log("the server is running on port 3000");